import request from '@/utils/request'

// 查询用印列表
export function listSeal(query) {
  return request({
    url: '/seal/list',
    method: 'get',
    params: query
  })
}

// 科室负责人查询用印列表
export function deptListSeal(query) {
  return request({
    url: '/seal/deptList',
    method: 'get',
    params: query
  })
}

// 指定审批人查询用印列表f
export function masterListSeal(query) {
  return request({
    url: '/seal/masterList',
    method: 'get',
    params: query
  })
}
// 指定审批人审批用印
export function masterApproval(data) {
  return request({
    url: '/seal/masterApproval',
    method: 'post',
    data: data
  })
}

// 查询用印详细
export function getSeal(sealId) {
  return request({
    url: '/seal/' + sealId,
    method: 'get'
  })
}

// 科室负责人查询用印详细
export function getSealByDept(sealId) {
  return request({
    url: '/seal/deptList/' + sealId,
    method: 'get'
  })
}

// 用印审核人查询用印详细
export function getSealByMaster(sealId) {
  return request({
    url: '/seal/sealMasterList/' + sealId,
    method: 'get'
  })
}

// 科室负责人审批用印
export function deptApproval(data) {
  return request({
    url: '/seal/deptApproval',
    method: 'post',
    data: data
  })
}

// 新增用印
export function addSeal(data) {
  return request({
    url: '/seal',
    method: 'post',
    data: data
  })
}

// 修改用印
export function updateSelfSeal(data) {
  return request({
    url: '/seal/updateSelfSeal',
    method: 'post',
    data: data
  })
}


//查询用印类型
export function querySealType() {
  return request({
    url: '/seal/querySealType',
    method: 'get'
  })
}

// 删除用印
export function delSeal(sealId) {
  return request({
    url: '/seal/' + sealId,
    method: 'delete'
  })
}

//导出选中
export function exportOwnSelectedSealList(data) {
  return request({
    url: '/seal/exportOwnSelectedSealList',
    method: 'post',
    data: data
  })
}

//补传附件
export function reUpFile(data) {
  return request({
    url: '/seal/reUpFile',
    method: 'post',
    data: data
  })
}
